#ifndef CONSTANTS_H
#define CONSTANTS_H

#include "filepathmanager.h"

static const int SAMPLE_ISN_LENGTH = 20;
static const int MATERIAL_ISN_LENGTH = 20;
static const int MIN_PASSWORD_LENGTH = 6;
static const int MAX_PASSWORD_LENGTH = 15;
static const int MAX_PARAMETER_COUNT = 5;
static const int MAX_WRONG_PW_TIMES = 6;
static const double DOUBLE_PRECISION = 1e-6; // double计算精度
static const double PARAM_VOLUME = 200;  // 计算实验参数使用的固定体积，单位：µl
static const QString USER_INIT_PASSWORD = "123456";
static const QString FMT_S = "yyyy-MM-dd hh:mm:ss";
static const QString FMT_MS = "yyyy-MM-dd hh:mm:ss.zzz";
static const QString PRODUCT_SERIES = "M1"; // 产品序列号
static const QString DRIVER_NAME = "/home"; // 数据所在磁盘
static const QString EXP_PASS = "Pass"; // 实验成功
static const QString EXP_FAIL = "Fail"; // 实验失败

#define LogDir                  FilePathManager::instance()->logDir()
#define DbPath                  FilePathManager::instance()->dbPath()
#define VerFile                 FilePathManager::instance()->verFile()
#define ManualFile              FilePathManager::instance()->manualFile()
#define ReportDir               FilePathManager::instance()->reportDir()
#define ConfigFile              FilePathManager::instance()->configFile()
#define StyleSheetCss           FilePathManager::instance()->styleSheetCss()
#define IntroductionDir         FilePathManager::instance()->introductionDir()
#define NormalBtnEnableCss      FilePathManager::instance()->normalBtnEnableCss()
#define NormalBtnDisEnableCss   FilePathManager::instance()->normalBtnDisEnableCss()
#define UpgradeScript           FilePathManager::instance()->upgradeScript()
#define VersionFile             FilePathManager::instance()->versionFile()
#define TranslationFile         FilePathManager::instance()->qmFile(gLanguage)
#define RawDataDir              FilePathManager::instance()->rawDataDir()
#define AudioDir                FilePathManager::instance()->audioDir()
#define UsbMountDir             FilePathManager::instance()->usbMountDir()
#define UsbRootDir              FilePathManager::instance()->usbRootDir()
#define UsbRawDataDir           FilePathManager::instance()->usbRawDataDir()
#define UsbRawLogDir            FilePathManager::instance()->usbRawLogDir()

#endif // CONSTANTS_H
